package search;

import act.End;
import act.IActor;
import act.IReceiver;

public class Echo implements IReceiver{

	private IActor actor;
	
	@Override
	public void receive(Object msg) {
		//just print msg to console
		System.out.println(msg.toString());
		if(msg instanceof End){
			this.actor.stop();
		}
			
	}

	@Override
	public void setActor(IActor actor) {
		this.actor = actor;
	}

	
}
